package com.ruoyi.forest;

import com.alibaba.fastjson2.JSONObject;
import com.dtflys.forest.annotation.*;

import java.util.Map;


public interface WeChatInvoiceClient {

    @PostRequest(url = "https://api.mch.weixin.qq.com/v3/new-tax-control-fapiao/fapiao-applications")
    @LogEnabled(false)
    Map<String,Object> applyForInvoice(@Header Map<String, Object> headers, @JSONBody Map<String, Object> params);

    @GetRequest(url = "https://api.mch.weixin.qq.com/v3/new-tax-control-fapiao/merchant/base-information")
    @LogEnabled(false)
    Map<String, Object> baseInformationInvoice(@Header Map<String, Object> headers);

    @PostRequest(url = "https://api.weixin.qq.com/card/invoice/seturl?access_token={access_token}")
    Map<String, Object> setUrlInvoice(@Var("access_token") String access_token, @JSONBody Map<String, Object> params);

    @PostRequest(url = "https://api.weixin.qq.com/card/invoice/setbizattr?action=set_contact&access_token={access_token}")
    Map<String, Object> setBizattr(@Var("access_token") String access_token, @JSONBody JSONObject params);

    @PostRequest(url = "https://api.weixin.qq.com/card/invoice/getauthurl?access_token={access_token}")
    Map<String, Object> getAuthUrl(@Var("access_token") String access_token, @JSONBody Map<String, Object> params);

    @PostRequest(url = "https://api.weixin.qq.com/card/invoice/getauthdata?access_token={access_token}")
    Map<String, Object> getAuthData(@Var("access_token") String access_token, @JSONBody Map<String, Object> params);

}
